Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Finder Guide /
Chapter 2 - Finder Objects / Object Class Definitions


Window

An object of class window is any Finder window.

PROPERTIES
bounds
The rectangle that bounds the content region of the window. (The "window frame"--the title bar and scroll bars--are not part of the content region.)
Class: List of four integers (Bounding Rectangle data type). The first two integers specify the coordinates of the upper-left corner of the window, and the last two integers specify the coordinates of the lower-right corner of the window.
Modifiable? Yes
closeable
A Boolean value that indicates whether the window has a close box (true) or not (false).
Class: Boolean
Modifiable? No
floating
A Boolean value that indicates whether the window is a floating window (true) or not (false). (A floating window is a window that appears in front of all other windows.) No Finder windows are floating windows.
Class: Boolean
Modifiable? No
index
The number of the window (window 1 is the frontmost window, window 2 is the window immediately behind window 1, and
so on).
Class: Integer
Modifiable? Yes
modal
A Boolean value that indicates whether the window is modal (true) or not (false). (A modal window is one that requires
a response from the user before the user can perform any
other tasks).
Class: Boolean
Modifiable? No
position
Two integers that specify the upper-left corner of the content region of the window. (The "window frame"--the title bar and scroll bars--is not part of the content region.)
Class: List of two integers (Point data type)
Modifiable? Yes
resizable
A Boolean parameter that indicates whether the window can be resized (true) or not (false).
Class: Boolean
Modifiable? No
titled
A Boolean parameter that indicates whether the window has a title bar (true) or not (false).
Class: Boolean
Modifiable? No
visible
A Boolean parameter that indicates whether the window is visible (true) or not (false). The value of this property is always false for Finder windows.
Class: Boolean
Modifiable? No
zoomable
A Boolean parameter that indicates whether the window can be zoomed (true) or not (false).
Class: Boolean
Modifiable? No
zoomed
A Boolean parameter that specifies whether the window is full size (true) or not (false).
Class: Boolean
Modifiable? Yes
ELEMENT CLASSES
If the window is a container window, its elements include all the items currently displayed inside the window. When folders in a window whose View property is name, date, size, or kind are expanded in outline view, the elements of the expanded folder become elements of the container window in which the folder is located.

Information windows, sharing windows, and status windows have no elements.

COMMANDS HANDLED
Clean Up, Close, Count, Data Size, Exists, Get, Open, Print, Sort, Update

DEFAULT VALUE CLASS RETURNED
Reference.

EXAMPLE
This script closes all Finder windows. It has the same effect as holding down the Option key and clicking the close box of the front window.

tell application "Finder"   close windows
end tell
For an example of a script that either takes a snapshot of the current window arrangement or restores a previously stored snapshot, see Listing 1-2 on page 10.

NOTES
In addition to the properties listed here, a Finder window can inherit certain properties, such as Name, from the object to which it belongs.

tell application "Finder"   name of front window
end tell
--result: "My World"

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996